<!-- screenfull 全屏组件 -->
<template>
  <div class="" @click="onToggle">
    <el-tooltip :content="$t('msg.guide.fullTitle')" effect="light">
      <svg-icon id="guide-full" :icon="isFullscreen ? 'exit-fullscreen' : 'fullscreen' "></svg-icon>
    </el-tooltip>
  </div>
</template>

<script setup>
import { ref } from 'vue'
import screenfull from 'screenfull'

// 是否全屏
const isFullscreen = ref(false)

// 切换事件
const onToggle = () => {
  screenfull.toggle()
  isFullscreen.value = !isFullscreen.value
}

</script>
<style lang="scss" scoped>
</style>
